package spec.zhangyuehua.$05;

import java.util.LinkedList;

/**
 * Created by yue on 2017/11/14.
 */
public class Queue {
    private LinkedList l=new LinkedList();
    //入队
    public void put(Object o){
        l.add(o);
    }
    //出队
    public Object remove(){
        return l.removeFirst();
    }
    //判断空否
    public boolean empty(){
        return l.isEmpty();
    }
    //获取大小
    public int size(){
        return l.size();
    }
    public static void main(String[] args) {
        Queue Q=new Queue();
        Q.put("王");
        Q.put("张");
        Q.put("李");
        System.out.println(Q.size());
        System.out.println(Q.remove());
        System.out.println(Q.remove());
        System.out.println(Q.remove());
        System.out.println(Q.empty());
    }
}
